//
//  CPABEInterface.h
//  iHealthEHR
//
//  Created by Joseph Ayo Akinyele on 4/21/10.
//  Copyright 2010 Johns Hopkins University. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "libfenc.h"
#import "libfenc_group_params.h"
#import "libfenc_ABE_common.h"			
#import "libfenc_LSSS.h"
#import "libfenc_WatersCP.h"
#import "policy_lang.h"
#import "pbc/pbc_test.h"
#import "NSData+Base64.h"
#import "openssl/aes.h"
#import "openssl/sha.h"
#import "openssl/evp.h"
#import "openssl/err.h"
#import "openssl/rand.h"

@interface CPABEInterface : NSObject {
	// add type info here too
@private
	fenc_context context;
	fenc_group_params group_params;
	fenc_global_params global_params;
	fenc_function_input func_list_input;
	fenc_key secret_key;
}

/* initialize the libfenc library */
-(void) Initialize;
/* read the public and secret params */
-(BOOL) ReadParameters;
-(BOOL) RetrieveKey:(NSString *) password with:(NSString *) username;
-(void) GenerateStaticKey;
-(NSString *) Decrypt:(NSString *) abe_cipher and:(NSString *) aes_cipher;
-(NSString *) ReturnPolicy:(NSString *) abe_cipher;
/* Clean-up CPABE library */
-(void) CleanUp;

@end
